<template>
	<view class="component-empty">
		<image class="icon" :src="icon" mode="widthFix"></image>
		<view v-if="text" class="placeholder">
			{{text}}
		</view>
	</view>
</template>

<script>
	export default{
		props: {
			icon: {
				type: String,
				default: require('./assets/empty-placeholder.png')
			},
			text: {
				type: String,
				default: '暂无数据'
			}
		}
	}
</script>

<style lang="scss" scoped>
	.component-empty{
		width: 100%;
		box-sizing: border-box;
		padding: 64rpx;
		text-align: center;
		.icon{
			width: 310rpx;
		}
		.placeholder{
			font-family: 'PingFang SC';
			font-style: normal;
			font-weight: 400;
			font-size: 28rpx;
			line-height: 40rpx;
			color: #A7ABB0;
			margin-top: 24rpx;
		}
	}
</style>
